package com.yanqu.xiuxian.crosssystem.manger.elementalbonds.msg;

import com.yanqu.xiuxian.crosssystem.manger.elementalbonds.data.ElementalBondsMatchData;
import com.yanqu.xiuxian.pb.elementalbonds.ElementalBonds.ElementalBondsSyncNoticeRespMsg;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class ElementalBondsNoticeHelper {
    private int modeId;

    private Map<ElementalBondsMatchData, List<ElementalBondsSyncNoticeRespMsg>> matchNoticeListMap = new HashMap<>();

    public ElementalBondsNoticeHelper(int modeId) {
        this.modeId = modeId;
    }

    public void addNotice(ElementalBondsSyncNoticeRespMsg.Builder elementalBondsSyncNoticeRespMsg, ElementalBondsMatchData elementalBondsMatchData) {
        matchNoticeListMap.putIfAbsent(elementalBondsMatchData, new ArrayList<>());
        matchNoticeListMap.get(elementalBondsMatchData).add(elementalBondsSyncNoticeRespMsg.build());
    }

    public int getModeId() {
        return modeId;
    }

    public Map<ElementalBondsMatchData, List<ElementalBondsSyncNoticeRespMsg>> getMatchNoticeListMap() {
        return matchNoticeListMap;
    }

}
